package com.jd.nbd.strategy05;

/**
 * Created by liyue on 2017/8/24
 */
public class CheckAgeRule implements Rule {
  @Override
  public boolean doValidate(Person person) {
    if (0 < person.getAge() && person.getAge() < 10) {
      return false;
    } else if (60 < person.getAge()) {
      return false;
    }

    return true;
  }
}
